package com.esri.core.tasks.ags.geoprocessing;

import com.esri.core.geometry.SpatialReference;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

/* loaded from: classes.dex */
class GPTaskParameters extends GPBasicTaskParameters {
    private static final long serialVersionUID = 1;
    private List<GPParameter> _inputParameters;
    private SpatialReference _outSR;
    private String[] _outputDataParamNames;
    private String[] _outputImageParamNames;
    private SpatialReference _processSR;
    private GPServiceInfo _serviceInfo;
    private GPTaskInfo _taskInfo;
    private long _statusCallbackInterval = 1000;
    private boolean _pollForCompletion = true;
    private boolean _returnZ = false;
    private boolean _returnM = false;

    public GPTaskParameters(List<GPParameter> list) {
        setGPInputParameters(list);
    }

    public GPTaskParameters(List<GPParameter> list, String[] strArr) {
        setGPInputParameters(list);
        setOutputDataParamNames(strArr);
    }

    public GPTaskParameters(List<GPParameter> list, String[] strArr, String[] strArr2) {
        setGPInputParameters(list);
        setOutputDataParamNames(strArr);
        setOutputImageParamNames(strArr2);
    }

    @Override // com.esri.core.tasks.ags.geoprocessing.GPBasicTaskParameters, com.esri.core.internal.tasks.f
    public Map<String, String> generateRequestParams() throws Exception {
        LinkedHashMap linkedHashMap = new LinkedHashMap();
        for (GPParameter gPParameter : this._inputParameters) {
            try {
                linkedHashMap.put(gPParameter.getParamName(), gPParameter.generateValueParams());
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
        SpatialReference spatialReference = this._outSR;
        if (spatialReference != null) {
            linkedHashMap.put("env:outSR", String.valueOf(spatialReference.getID()));
        }
        SpatialReference spatialReference2 = this._processSR;
        if (spatialReference2 != null) {
            linkedHashMap.put("env:processSR", String.valueOf(spatialReference2.getID()));
        }
        linkedHashMap.put("returnZ", String.valueOf(isReturnZ()));
        linkedHashMap.put("returnM", String.valueOf(isReturnM()));
        return linkedHashMap;
    }

    @Override // com.esri.core.tasks.ags.geoprocessing.GPBasicTaskParameters, com.esri.core.internal.tasks.f
    public boolean validate() {
        return this._inputParameters != null;
    }

    public void setGPInputParameters(List<GPParameter> list) {
        this._inputParameters = list;
    }

    public List<GPParameter> getGPInputParameters() {
        return this._inputParameters;
    }

    public SpatialReference getOutSR() {
        return this._outSR;
    }

    public SpatialReference getProcessSR() {
        return this._processSR;
    }

    public void setOutSR(SpatialReference spatialReference) {
        this._outSR = spatialReference;
    }

    public void setProcessSR(SpatialReference spatialReference) {
        this._processSR = spatialReference;
    }

    public long getStatusCallbackInterval() {
        return this._statusCallbackInterval;
    }

    public void setStatusCallbackInterval(long j) {
        this._statusCallbackInterval = j;
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    public GPServiceInfo getServiceInfo() {
        return this._serviceInfo;
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    public GPTaskInfo getTaskInfo() {
        return this._taskInfo;
    }

    public void setOutputDataParamNames(String[] strArr) {
        this._outputDataParamNames = strArr;
    }

    public String[] getOutputDataParamNames() {
        return this._outputDataParamNames;
    }

    public void setOutputImageParamNames(String[] strArr) {
        this._outputImageParamNames = strArr;
    }

    public String[] getOutputImageParamNames() {
        return this._outputImageParamNames;
    }

    public void setPollForCompletion(boolean z) {
        this._pollForCompletion = z;
    }

    public boolean isPollForCompletion() {
        return this._pollForCompletion;
    }

    public void setReturnZ(boolean z) {
        this._returnZ = z;
    }

    public boolean isReturnZ() {
        return this._returnZ;
    }

    public void setReturnM(boolean z) {
        this._returnM = z;
    }

    public boolean isReturnM() {
        return this._returnM;
    }
}
